<?php require_once 'appinclude.php'; ?>

<style>
<?php echo htmlentities(file_get_contents("http://geekygrl.com/facebook/test/mystyle.css", true)); ?>
</style>

<?php

echo '<script type="text/javascript" src="http://geekygrl.com/facebook/test/niftycube.js"></script>';
echo '<script type="text/javascript"> window.onload=function(){Nifty("div#box", "transparent");}</script>';

// user ID is outputed
echo '<div id="box">';
echo "<p>$user</p>";
echo "<p>Your name is: <fb:name uid=\"$user\" useyou=\"false\" /></p>";

// now we output friends
echo "<p> you have several friends: </p>";
$friends = $facebook->api_client->friends_get();
//echo "<ul>";
//foreach ($friends as $friend) {
//	echo "<li><fb:name uid=\"$friend\" useyou=\"false\" /></li>";
//}
//echo "<ul>";


// now we want to output friends in a dropdown menu

echo '<form name="menuform">';
echo '<select name="menu1">';
echo '<option value="http://apps.new.facebook.com/testmyq/" selected>friends</option>';
foreach($friends as $friend){
	echo "<option value=$friend><fb:name uid=\"$friend\" useyou=\"false\" /></option>";
}
echo '</select>';
echo '<p><input type="button" name="Submit" value="Go" 
onClick="top.location.href = this.form.menu1.options[this.form.menu1.selectedIndex].value;
return false;"></p>';
echo '</form>';
echo "</div>";
?>
